<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.*"%>
<%@page import="com.infomanage.po.*"%>
<%@page import="org.hibernate.*"%>
<%@page import="org.hibernate.cfg.*"%>
<%
	request.setCharacterEncoding("UTF-8");

%>
<html>
	<head>
		<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
		<link href="../../css/style.css" rel="stylesheet" type="text/css">
		<script type="text/javascript">
		function modifyItem(id) {
			var url = "equipmentPlan_edit.jsp?eqmtId=" + id;
			var width = '550px';
			var height ='500px';
			var arg = "dialogHeight:" + height + ";dialogWidth:" + width + ";status:no;location:no;";
			var returnValue = window.showModalDialog(url, "", arg);
			if(returnValue != null){
				window.location.reload();
			}
		}

		function delItem(id) {
			if(window.confirm("确定删除吗？")){
				actionFrame.location.href = "equipmentPlan_action.jsp?actionType=del&eqmtId=" + id;
			}
		}

	   function showError(error){
		   alert(error);
	   }

	   function showInfo(info){
		   if(info && info != "") {
		   		alert(info);
		   }
		   window.location.reload();
	   }
	</script>
	</head>
	<body rightmargin="0" bottommargin="0" leftmargin="0" topmargin="0">
		<table width="100%" height="100%" border="0" align="center"
			cellpadding="0" cellspacing="0"
			style="table-layout: fixed; background: #ffffff;">
			<tr height="29px">
				<td valign="middle" height="29px" class="td_title"
					style="padding-left: 20px; border-right: 1px #a3c6e2 solid;">
					已发送短信列表
				</td>
			</tr>
			<tr>
				<td valign="top">
					<table width="100%" height="100%" border="0" cellpadding="0"
						cellspacing="0" class="tabMain">
						<col width="20%">
						<col width="20%">
						<col width="60%">
						<tr class="thlist">
							<td>
								手机号
							</td>
							<td>
								发送时间
							</td>
							<td>
								消息内容
							</td>
						</tr>

						<!-- 输出数据 -->
						<tr valign="top">
							<td colspan="10" width="100%">
								<div style="width: 100%; height: 100%; overflow: auto;">
									<table width="100%" style="table-layout: fixed;"
										cellpadding="0" cellspacing="0">
										<col width="20%">
										<col width="20%">
										<col width="60%">
                                  
										<%
											String phonenum=(String)request.getParameter("phonenum");		
										    SessionFactory sf = new Configuration().configure()
													.buildSessionFactory();
											Session session1 = sf.openSession();
											String hql="From Sendmsg where phoneNum like '%"+phonenum+"%'";
											Query q = session1.createQuery(hql);
											session1.close();
											List list = q.list();
										    for (ListIterator iterator = list.listIterator(); iterator.hasNext(); ) {
										            Sendmsg msg = (Sendmsg) iterator.next();
										          
										 %>
										   <tr class="tdlist">
											<td>
												<%=msg.getPhoneNum()%>
											</td>
											<td>
												<%=msg.getSendTime()%>
											</td>
											<td>
												<%=msg.getMsgContent()%>
											</td>
											</tr>
                                          <%
										    }
                                          %> 
										

									</table>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>

			<!-- 分页 -->
	
		</table>
		<iframe src="#" name="actionFrame" style="display: none;"></iframe>
	</body>
</html>
